$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("ChangeBaseInfo")
    const dgrid1 = $NG.getCmpApi("")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()
    const user = $NG.getUser()
    mstform.getItem("user_tbr").setValue({
                    label:user.userName,
                    value:user.userID
                })
    useValuesChange(()=>{
        const PhidCnt = mstform.getItem("PhidCnt").getValue()
        if(!PhidCnt) return 
        const datas = mstform.getItem("PhidCnt").getOrigin()
        console.log(`datas`,datas);
        const arr = [
            {
                key:'user_xmssdw',
                value:{
                    value:datas.user_xmssdw2,
                    label:datas.user_xmssdw2_EXName
                }
            },
            {
                key:'user_jfdw',
                value:{
                    value:datas.InvoiceSen,
                    label:datas.InvoiceSen_EXName
                }
            },
            {
                key:'user_htje',
                value:datas.CntSumVatFc
            },
            {
                key:'user_htbh',
                value:datas.Title
            },
        ]
        setHeadValues(arr)
    },"PhidCnt")

    // 表头批量赋值
    function setHeadValues(arr){
        arr.forEach(item=>{
            mstform.getItem(item.key)?.setValue(item.value)
        })
    }
})